<template>
    <div class="homeContainer">
        <!-- 首页轮播图 -->
        <my-carousel :lunbotu="lunbotu" :isfull="true"></my-carousel>
        <!-- MUI 九宫格改造成 六宫格 -->
        <ul class="mui-table-view mui-grid-view mui-grid-9">
                    <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-md-4">
                        <router-link to="/home/newslist">
                            <img src="../../images/news.png" alt="">
                            <div class="mui-media-body">新闻资讯</div>
                        </router-link>
                    </li>
                    <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-md-4">
                        <router-link to="/home/photoslist">
                            <img src="../../images/picShare.png" alt="">
                            <div class="mui-media-body">图片分享</div>
                        </router-link>
                    </li>
                    <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-md-4">
                        <router-link to="/home/goodslist">
                            <img src="../../images/goodShow.png" alt="">
                            <div class="mui-media-body">商品购买</div>
                        </router-link>
                    </li>
                    <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-md-4"><a href="#">
                            <img src="../../images/feedback.png" alt="">
                            <div class="mui-media-body">留言反馈</div></a></li>
                    <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-md-4"><a href="#">
                            <img src="../../images/search.png" alt="">
                            <div class="mui-media-body">视频专区</div></a></li>
                    <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-md-4"><a href="#">
                            <img src="../../images/callme.png" alt="">
                            <div class="mui-media-body">联系我们</div></a></li>
		        </ul> 
    </div>
</template>
<script>
import { Toast } from 'mint-ui';
import myCarousel from "../subComponents/Carousel.vue"
export default {
    data(){
        return {
            lunbotu : []
        }
    },
    // created(){
    //     this.getLunboList();
    // },
    created:function(){
        this.getLunboList();
    },
    methods:  {
        getLunboList(){
            // 获取轮播图的数据信息 通过vue-resource this.$http.get()
            this.$http.get("api/getlunbo").then( result =>{
                // console.dir(result.body.message )
                if( result.body.status === 0 ){
                    // console.dir(result.body)
                    this.lunbotu = result.body.message
                  console.dir(this.lunbotu)
                } else {
                   Toast('加载失败');
                }
            })
        } 

    },
    components:{
        myCarousel
    }
}
</script>
<style lang="scss" scoped>
 h2 {
     background: red;
 }
 
.mui-grid-view.mui-grid-9 {
    border: none;
    background: #fff;
    
}
.mui-grid-view.mui-grid-9 .mui-table-view-cell {
    border: none;
    img {
        // display: block;
        width: 60px;
        // height: 60px;
        // margin: 0px auto;
    }
    div {
        font-size: 13px;
    }
}

</style>



